package com.sjlh.centurylianhua.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sjlh.centurylianhua.entity.User;
import com.sjlh.centurylianhua.entity.UserRole;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserRoleMapper extends BaseMapper<UserRole> {
    @Select({ "SELECT COUNT(*) AS total FROM role","SELECT id,userId,roleId FROM user_role WHERE (userId = #{userId})","SELECT roleId,roleName,roleDescription,beiyong1,beiyong2,beiyong3 FROM role WHERE roleId IN ( #{roleId} )" })
    public List<User> findUserAndRole();
}
